import axios from 'axios'

export const API_URL = 'http://localhost:8080/api'

// 配置 axios 实例
const api = axios.create({
  baseURL: API_URL,
  timeout: 120000,
})

// 请求拦截器
api.interceptors.request.use(request => {
  console.log('发送请求:', request.url, request.data)
  return request
})

export default api